home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15716 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c++,comp.lang.c
  4. Subject: Re: HELP: no mapping at the fault address
  5. Date: Sat, 06 Apr 96 22:27:41 GMT
  6. Organization: none
  7. Message-ID: <828829661snz@genesis.demon.co.uk>
  8. References: <opybocswab.fsf@sweetbay.will.uiuc.edu> <4k3qn8$1gk6@msunews.cl.msu.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4k3qn8$1gk6@msunews.cl.msu.edu>
  15.            jliu@perm.fw.msu.edu "Jianguo Liu" writes:
  16.  
  17. >Hello, everyone:
  18. >
  19. >I had an error when running a program in SPARCcompiler C++ 
  20. >4.0.1 (Solaris 2.4). The error was deteced using dbx. The 
  21. >message was
  22. >
  23. >**********************************
  24. >
  25. >signal SEGV (no mapping at the fault address) in t-splay at 
  26. >0xef6bc470. 
  27. >
  28. >The current line is 
  29. >
  30. >new_ptr=(strucut tree *) malloc(sizeof(struct tree));
  31.  
  32. Did you include stdlib.h? You must ensure that all functions that don't
  33. return int or are variadic are declared (it is best that all functions are
  34. declared). If that isn't the problem your program probably corrupted the
  35. heap earlier by some illegal pointer operation such as writing outside
  36. array bounds, using undefined pointers, or passing illegal pointers to free
  37. (i.e. pointers to objects not allocated from the heap or already freed).
  38.  
  39. You should also be a little more clear whether you are using C or C++.
  40.  
  41. -- 
  42. -----------------------------------------
  43. Lawrence Kirby | fred@genesis.demon.co.uk
  44. Wilts, England | 70734.126@compuserve.com
  45. -----------------------------------------
  46.